﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace Pointandclick.Objects
{
    class MovingClickable:Clickable
    {
        public MovingClickable(Texture2D image, Point position)
            : base(image, position)
        {
        }

        public bool Update(float speed, GameTime gameTime)
        {
            rectangle.X -= (int)((speed)*gameTime.ElapsedGameTime.Milliseconds);
            return base.Update();
        }
    }
}
